package cn.baizhi.feign;

import cn.baizhi.entity.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient("tags")
public interface TagClient {

    @GetMapping("tags/{id}")
    ResponseEntity<Tag> selectOne(@PathVariable("id") Integer id);

    @GetMapping("tags")
    public ResponseEntity<List<Tag>> selectAll();
}
